package com.lyxedu.services.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lyxedu.services.UserService;
import com.lyxedu.mapper.UserMapper;
import com.lyxedu.pojo.User;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public boolean saveOrUpdateUser(User user) {
        if (user.getId() != null){
//            修改
           return updateById(user);
        }
        return save(user);
    }
}
